package generated.com.euncet.example;

@javax.persistence.Entity
public abstract class Category {
	@javax.persistence.Id
	@javax.persistence.GeneratedValue(strategy=javax.persistence.GenerationType.IDENTITY)
	private Long id;
	
	public long getId() {
		return id;
	}
	
	public void setId(long id) {
		this.id = id;
	}
	
	private String name;
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	//Associations:
	
	//Asociation with class "com.euncet.example.Product" Multiplicity: Many
	public java.util.List<com.euncet.example.Product> getProducts() {
		java.util.List<com.euncet.example.Product> products = com.euncet.example.dictionaries.ProductDictionary.getCategoryProducts((com.euncet.example.Category) this);
		
		return products;
	}
	
	public void addProduct(com.euncet.example.Product product) {
		product.setCategory((com.euncet.example.Category) this);
	}
	
	public void removeProduct(com.euncet.example.Product product) {
		product.setCategory(null);
	}
	
}
